T=20; n=[16,20,18,19,22,25,20,18,20,19,19,19,22,16,24,19,21,19,20,21]; a=[37,30,36,40,33,29,27,18,21,23,35,25,38,28,31,39,38,31,36,7,10,35,40,39,37,25,30,28,22,26,16,24,14,32,34,29,37,33,15,40,31,3,25,24,21,10,20,38,34,30,29,11,6,39,25,37,19,32,26,35,33,28,10,40,27,24,14,39,38,21,36,23,18,23,25,37,39,33,36,32,8,22,31,27,20,24,40,13,34,35,17,28,38,19,12,12,17,16,7,28,27,19,38,23,35,29,39,26,10,31,20,5,30,36,15,25,40,37,34,32,26,18,33,34,38,29,20,24,36,40,37,28,27,35,12,25,17,23,39,32,24,15,26,38,29,13,34,32,31,17,28,37,35,40,9,36,39,33,19,29,36,37,33,31,26,13,4,34,23,25,28,38,32,14,40,30,35,39,35,38,22,32,14,28,4,27,20,40,31,36,29,26,21,33,37,39,30,29,30,34,33,27,40,23,25,38,32,36,37,17,14,35,21,22,11,39,16,15,35,32,39,40,24,18,29,21,36,38,34,20,25,31,37,26,30,21,36,30,24,25,19,16,31,33,26,32,22,38,4,34,37,35,40,23,27,10,39,34,29,31,23,18,37,40,33,25,38,35,22,36,32,39,11,4,13,28,38,22,23,3,35,16,37,33,26,39,29,34,25,20,36,14,24,18,27,40,32,18,34,36,27,37,21,31,33,25,38,40,32,39,29,14,10,30,19,16,34,32,40,17,31,39,11,27,24,35,22,36,14,15,7,38,37,8,33,19,25,13,3,31,20,28,12,24,27,38,25,30,21,37,36,40,23,35,39,32,15,37,38,29,10,26,40,39,35,33,28,18,19,31,24,9,16,22,36,21,30,17,29,25,21,11,22,34,40,24,6,38,36,35,26,32,31,27,39,13,37];